<template>
    <el-popover
        placement="right"
        width="600"
        trigger="click"
    >
        <div class="e-table">
            <el-table :data="historyTableDataJieSuanHuiZong">
                <el-table-column
                    min-width="200"
                    property="billNo"
                    label="结算编号"
                    class-name="blue-column"
                ></el-table-column>
                <el-table-column
                    width="120"
                    property="settlementDate"
                    label="结算日期"
                ></el-table-column>
                <el-table-column
                    width="120"
                    property="settlementDate"
                    label="加扣款数量"
                    v-if="typeVal"
                ></el-table-column>
                <el-table-column
                    width="120"
                    property="sourceValue"
                    label="加扣款单价"
                    v-if="typeVal"
                ></el-table-column>
                <el-table-column
                    width="120"
                    property="amount"
                    label="金额"
                ></el-table-column>
                <el-table-column
                    width="100"
                    property="state"
                    label="状态"
                ></el-table-column>
            </el-table>
        </div>
        <img @click="clickIcon"
            slot="reference"
            src="@/assets/huizong.png"
        />
    </el-popover>
</template>

<script>
import { mapState } from 'vuex'
export default {
    props: {
        typeVal: {
            type: Boolean,
            default: false
        }
    },
    computed: {
        ...mapState('settlementManagement', ['historyTableDataJieSuanHuiZong'])
    },
    methods: {
        clickIcon () {
            this.$emit('clickIcon')
        }
    }
}
</script>

<style lang="scss" scoped>
    .e-table{
        padding: 0;
        background: none;
    }
    ::v-deep .el-popover__reference-wrapper{
        display: block;
        margin-left: 10px;
        line-height: 1;
    }
</style>